package de.hft_stuttgart.dsa.ctt.model;

/**
 * This class represents a period within a week.
 * 
 * @author Eduard Tudenhoefner
 */
public class Period {
	private int period;

	public Period(int periodsPerDay, int periodOfDay, int dayOfWeek) {
		this.period = getCalculatedPeriod(periodsPerDay, periodOfDay, dayOfWeek);
	}

	public Period(int period) {
		this.period = period;
	}

	public int getPeriod() {
		return period;
	}

	public static int getCalculatedPeriod(int periodsPerDay, int periodOfDay, int dayOfWeek) {
//		return (periodsPerDay * (dayOfWeek)) + (periodOfDay + 1);
		return (periodsPerDay * dayOfWeek) + periodOfDay;
	}
}
